import request from '@/utils/request'

// 查看当前所有课程
export function listStudent() {
  return request({
    url: '/student/homework/allHomework',
    method: 'get',
  })
}

// 加入新课程
export function getStudent(Id) {
  return request({
    url: '/student/homework/selOne/'+Id,
    method: 'get',
  })
}

// 新增(注册)学生信息
export function addStudent(data) {
  return request({
    url: '/student/student',
    method: 'post',
    data: data
  })
}

// 修改(注册)学生信息
export function updateStudent(data) {
  return request({
    url: '/student/homework/update',
    method: 'put',
    data: data
  })
}

// 删除(注册)学生信息
export function delStudent(studentId) {
  return request({
    url: '/student/student/' + studentId,
    method: 'delete'
  })
}
